//
//  BaseModel.h
//  jipin
//
//  Created by chuangjia on 23/5/15.
//  Copyright (c) 2015 liuchengbin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "ZApi.h"
@interface BaseModel : NSObject
+(NSString*)publicParams;
/*
 求购页
 http://mobile.kancike.com/api/ware_list.php?action=ranking
 
 晒单页
 http://mobile.kancike.com/api/ware_list.php?action=shaidan
 
 最新页
 http://mobile.kancike.com/api/ware_list.php?action=latest
 */
+ (void)index:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 http://mobile.kancike.com/api/getAppVer.php?appVer=1.0.0
 
 {"code":0,"msg":"\u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c"}
 0-已经是最新版本
 1-有最新版本可以下载安装
 */
+ (void)updateVer:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;

/*
 启动投递，各种常用参数，设备类型，os版本，app版本，屏幕尺寸
	统计地址：
 http://mobile.kancike.com/stat/start.html?act=startup&os=&appVer=&osVer=&partner=
 设备类型，os版本，app版本，屏幕尺寸
 */
+ (void)stat:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)statbuypage:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
//购买统计使用
+(void)tongjiBuy:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【会员接口】：
 POST方法
 http://mobile.kancike.com/user.php
 action：register-注册
 email：邮箱地址
 password：密码的MD5字符串
 token：推送token
 os：操作系统，目前只有ios
 phone：手机号
 nick_name：昵称
 
 action：set_user_info-设置头像和昵称
 user_id：用户ID
 nick_name：昵称
 token：推送token
 os：操作系统，目前只有ios
 upfile：上传文件
 
 login：登录
 email：邮箱地址
 password：密码的MD5字符串
 token：推送token
 os：操作系统，目前只有ios
 
 logout：退出登录
 check_in
 */
+ (void)userCheckIn:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)user:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)loginOut:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 //
 第三方登录
 POST方法
 http://mobile.kancike.com/user.php
 action：third_party
 third_id：第三方登录接口返回的唯一ID（openid或者userid等）
 third_type：第三方网站编码，0-本站，1-淘宝，2-微信，3-qq，4-微博
 nick_name：昵称
 user_face：头像地址
 phone：手机号
 token：推送token
 os：操作系统
 
 */
+ (void)setNickName:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)thirdpartyLogin:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)userinfo:(NSString*)name image:(UIImage*)image success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)usernickname:(NSString*)name success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure
;
/*
 个人中心
 http://mobile.kancike.com/api/home.php?action=index&from=0&os=iPhone&appVer=1.0.1&osVer=8.3&partner=appstore&uuid=150434b3b094ae939f606a1a768b46e951bfafb9&ver=1.1&guest_id=100001&user_id=100001
 首页
 action=index——个人中心首页
 guest_id=100001——观看者的用户ID
 user_id=100001——数据拥有者的用户ID
 
 晒单
 action=shaidan——个人中心的晒单数据
 guest_id=100001——观看者的用户ID
 user_id=100001——数据拥有者的用户ID
 from=0——从第几条数据开始
 
 喜欢
 action=like——个人中心的喜欢数据
 guest_id=100001——观看者的用户ID
 user_id=100001——数据拥有者的用户ID
 from=0——从第几条数据开始
 
 评论
 action=comment——个人中心的评论数据
 guest_id=100001——观看者的用户ID
 user_id=100001——数据拥有者的用户ID
 from=0——从第几条数据开始
 */
+ (void)homeV1:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)home:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*【自动补全关键词接口】
GET方法
http://mobile.kancike.com/api/suggestion.php?action=search&word=sj
action：search - 搜索功能，cate - 添加分类功能，brand - 添加品牌功能
word：关键词，支持拼音
*/
+ (void)suggestion:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【搜索接口】
 http://mobile.kancike.com/search.php?word=&from=
 */
+ (void)search:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+(void)moresearch:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【关注接口】：
 GET方法
 未登录用户请求会失败。
 http://mobile.kancike.com/api/follow.php?action=&user_id=&follow_id=&cate_id=&brand_id=&tag=
 action：follow_user - 关注用户，follow_cate - 关注分类，follow_brand - 关注品牌，follow_tag - 关注标签，list - 关注列表
 user_id：请求用户ID（可省略，系统会自动使用服务端的登录信息，如果使用必须与服务端一致）
 follow_id：被关注用户的ID，action=follow_user时有效
 cate_id：被关注分类的ID，action=follow_cate时有效
 brand_id：被关注品牌的ID，action=follow_brand时有效
 tag：被关注的tag标签，action=follow_tag时有效，暂未提供
 
 返回数据：
 {"code":1,"msg":"\u5df2\u5173\u6ce8","follow_user":["100020","100021","100022","100059"],"follow_cate":["15","118"],"follow_brand":[]}
 code：1 - 请求成功，其他值 - 请求失败
 code：1 - 关注成功，2 - 取消关注 ，其他值 - 请求失败
 msg：调用信息
 follow_user：关注用户ID列表
 follow_cate：关注分类ID列表
 follow_brand：关注品牌ID列表
 follow_tag：关注标签列表，暂未提供
 */
+ (void)follow:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【商品列表】：
 GET方法
 http://mobile.kancike.com/ware_list.php?action=&guest_id=&cat2_id=&brand_id=&tag&from=&grid=
 
 action：recommend - 推荐商品，home - 个人发布的商品，follow - 关注的商品 ，like - 喜欢的商品，comment - 评论过的商品，hot-热门
 guest_id：请求用户的ID，通常用于验证请求者身份或统计
 user_id：被查看用户的ID，查看他人个人中心等
 cat2_id：二级分类id，进入分类页面
 brand_id：品牌ID，进入品牌页面
 tag：标签名称，进入标签页
 from：从第几条数据开始
 grid：列数，每页条数=20*$gridcount
 
 lat：用户当前位置经度，暂未使用
 lon：用户当前位置维度，暂未使用
 sku_name：商品名，暂未使用
 
 
 数据格式：
 data：标签列表，标签中包含商品列表
 others：商品列表
 end：1-已经到最后一页，0-没到最后一页
 cate_followed：输入参数cat2_id对应的分类是否关注；1-已关注，0-未关注
 brand_followed：输入参数brand_id对应的品牌是否关注；1-已关注，0-未关注
 
 商品信息：
 landscape：1-商品横向显示，0-大图显示
 */
+ (void)wareList:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)cateListData:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;

/*
 【评论列表】：
 GET方法
 http://mobile.kancike.com/comment_list.php
 from：从第几条开始
 */
+ (void)commentList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【评论接口】：
 POST方法
 http://mobile.kancike.com/comment.php
 action：comment，发表评论
 photo_id：商品id
 uid:用户id
 token：推送token
 os：操作系统，目前只有ios
 text:评论内容
 
 action：del，删除评论
 comment_id：评论ID
 
 action：push_top顶评论
 comment_id：评论ID
 uid:用户id
 返回数据：
 {"code":1,"msg":"\u8e29\u6210\u529f","push_top":"1"}
 
 action：push_bottom踩评论
 comment_id：评论ID
 uid:用户id
 {"code":1,"msg":"\u8e29\u6210\u529f","push_bottom":"1"}
 jp_郝庆晟  19:27:30
 http://mobile.kancike.com/comment.php
 action：comment-发表评论，del-删除评论，push_top-顶评论，push_bottom-踩评论
 
 */
+ (void)comment:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【喜欢列表】：
 GET方法
 http://mobile.kancike.com/love_list.php
 photo_id:商品ID
 from：从第几条开始
 */
+ (void)loveList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【喜欢接口/取消喜欢】：
 GET方法
 http://mobile.kancike.com/love.php
 photo_id：商品id
 uid:用户id
 token：推送token
 os：操作系统，目前只有ios
 */
+ (void)love:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*【标签接口】：
 GET方法
 http://mobile.kancike.com/api/tag.php?action=&photo_id=&tags=
 action：list - 返回标签列表，update - 更新商品标签
 photo_id：商品ID
 tags：用于更新的标签字串，action=update时有效，提交时需要用空格拼接多个标签，例如：复古 中式 木制
 
 action=list，返回数据：
 [{"tag":"\u6728\u5236\u6536\u7eb3","selected":1},{"tag":"\u6298\u53e0\u6536\u7eb3","selected":1},{"tag":"\u684c\u9762\u6536\u7eb3","selected":0}]
 tag：标签名
 selected：1-已设置，0-未设置
 
 action=update，返回数据
 code：1 - 更新成功 ，-1 - 更新失败
 msg：返回信息
 */
+ (void)tag:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*留言板发帖
GET方法
http://mobile.kancike.com/api/bbs.php?action=post&uid=100001&os=iPhone&appVer=1.0.0&osVer=8.3&uuid=1f2ddb1a4fc18156694694d1c0be1744c557d46d&text=111

uid:用户id
token：推送token
os：操作系统，目前只有iPhone

返回数据：
{"code":1,"msg":"\u559c\u6b22","like_cnt":2}


留言板列表
GET方法
http://mobile.kancike.com/api/bbs.php?action=list&from=0
from：从第几条开始
 */
+ (void)bbs:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 晒单详细
 http://mobile.kancike.com/api/shaidan_detail.php?photo_id=17323&from=0&os=iPhone&appVer=1.0.1&osVer=8.3&partner=appstore&uuid=e816e2c709ed4e664acf0ae78ea318bcb2014a76&ver=1.1&guest_id=100001&debug=1
 */
+ (void)shaidanDetail:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 晒单列表
 http://mobile.kancike.com/api/shaidan_list.php?photo_id=3153&from=1&os=iPhone&appVer=1.0.1&osVer=8.3&partner=appstore&uuid=150434b3b094ae939f606a1a768b46e951bfafb9&ver=1.1&guest_id=100021
 */
+ (void)shaidanList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;

/*
 POST
 http://mobile.kancike.com/api/upload_shaidan.php
 
 cate_id：分类ID，必填
 cate_name：分类名称，必填
 group_id：一级分类ID，必填，suggestion接口返回
 group_name：一级分类名称，必填，suggestion接口返回
 
 图片文件：n个图片，必填
 upfile0
 upfile1
 ...
 upfilen
 
 image_text：图片描述，n个与图片数量对应["","",""]，必填
 
 brand_id：品牌ID，可选
 brand_name：品牌名称，可选
 photo_id：商品ID，可选
 title：商品名称，可选
 price：商品价格，可选
 currency：币种，可选
 */
+(void)postShaiDan:(NSDictionary*)params images:(NSArray *)images success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure uploadProgress:(void(^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress;
+(void)postShaiDan:(NSDictionary*)params coverImages:(UIImage*)cover images:(NSArray *)images success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure uploadProgress:(void(^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress;
/*
 http://mobile.kancike.com/api/ranking.php?action=publish
 POST
 title：榜单标题，非空15个字以内
 text：榜单介绍，非空
 cate_id：分类ID，可空
 cate_name：分类名称，可空
 
 推荐
 http://mobile.kancike.com/api/ranking.php?action=recommend
 POST
 rank_id：榜单id
 photo_id：商品ID，json字符串["1","2","3"]
 */
+ (void)rankPublish:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)rankRecommend:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 选择榜单
 http://mobile.kancike.com/api/suggestion.php?action=ranking&word=&cate_id=
 GET
 word：搜索关键字，可选
 cate_id：分类ID，可选
 
 返回数据：
 [{},{},{}]
 "photo_id":"1004395",——榜单ID
 "title":"\u6700\u597d\u7528\u7684\u5439\u98ce\u673a",——榜单标题
 "text":"\u4e0d\u4f24\u5934\u53d1",——榜单介绍
 "recommend_user":2,——推荐用户数
 "push_user":2,——参与用户数
 "detailPicURL":[{},{},{}]——图片列表
 "url":"http:\/\/"
 */
+ (void)ranking:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 榜单商品
 http://mobile.kancike.com/api/suggestion.php?action=bangdan_ware&rank_id=1004405&word=
 
 rank_id，榜单ID，必填
 cate_id，分类ID，可选
 brand_id，品牌，可选
 word，搜索关键词，可选
 
 返回数据：
 "data":[{},{},{}]
 "end":"1"——0-未结束，1-已结束
 "end_msg":"没有更多单品"
 
 "photo_id":"73886",
 "brand_id":"2988",
 "brand_name":"",
 "title":"TAM DAO \u6a80\u9999\u9999\u6c34",
 "like_cnt":"207"
 "largePicURL":"http"
 "price_str":"207"
 "selected":"0"——0-未选中，1,-已存在榜单中
 */
+ (void)rankingware:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 商品详情页-更多
 http://mobile.kancike.com/api/ware_detail_more.php?action=ranking_hot&photo_id=1004405&from=2&os=iPhone&appVer=1.0.1&osVer=8.3&partner=appstore&uuid=150434b3b094ae939f606a1a768b46e951bfafb9&ver=1.1&guest_id=100021
 
 action=ranking_hot，——ranking_hot更多热门榜单，ranking_new更多最新榜单
 photo_id=1004405——榜单ID
 from=2——分页参数，从第几条记录返回
 debug=1——输出调试信息
 
 输出数据
 is_shaidan=10，榜单详情页：
 ranking_hot-热门单品
 ranking_new-最新单品
 */
+ (void)wareDetailMore:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *, id))success failure:(void (^)(NSError *))failure;
/*
 http://mobile.kancike.com/api/ranking.php?action=push_top
 POST
 rank_id：榜单id
 photo_id：商品ID
 
 返回数据：
 push_top，商品被顶数量
 */
+ (void)rankPushTop:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 删除榜单里的单品
 http://mobile.kancike.com/api/ranking.php?action=del
 POST
 rank_id：榜单id
 photo_id：商品ID
 */
+ (void)rankAction:(NSString*)action params:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+(void)postRankReason:(NSDictionary*)params images:(NSArray *)images success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure uploadProgress:(void(^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress;
/*
 获取商品信息
 http://mobile.kancike.com/api/fetchItem.php
 POST
 data：
 第一次为用户输入的url，或者淘宝app复制的链接；
 服务端返回code>1时，为前端抓到html数据。
 url：
 第一次为空；
 code>1时返回的url，循环请求提交数据，直到code=1，最多嵌套3层。
 
 返回数据：
 code：1-返回成功，>1-需要前端抓取数据
 url：当code>1时，需要前端抓取html的地址
 msg：
 data：code=1时，返回的商品数据
 "from_site":""
 "itemid":""
 "sold_url":""
 "sold_title":""
 "price":""
 "currency":""
 "brand_name":""
 "pictureinfolist":""
 */
+ (void)fetchItem:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 发布商品（链接）
 http://mobile.kancike.com/api/publish.php
 POST
 
 cate_id：分类ID，必填，/api/suggestion.php?action=cate接口返回
 cate_name：分类名称，必填，/api/suggestion.php?action=cate接口返回
 group_id：一级类目ID，必填，/api/suggestion.php?action=cate接口返回
 group_name：一级类目名称，必填，/api/suggestion.php?action=cate接口返回
 title：标题，必填，用户填写
 picture_text：商品描述，必填，用户填写
 sold_title：原始标题，必填，/api/fetchItem.php接口返回
 currency：币种，必填，/api/fetchItem.php接口返回，用户选择
 price：价格，必填，/api/fetchItem.php接口返回，用户填写
 pictureinfolist：图片信息，必填，/api/fetchItem.php接口返回，用户选择设置头图，app拼json
 [{"":"","":"","":"","":""},{},{}]
 "url":"http",
 "width":"315",
 "height":"315",
 "top":"1",——只有头图才有
 "title":""
 
 from_site：来源，必填，/api/fetchItem.php接口返回
 itemid：原商品ID，必填，/api/fetchItem.php接口返回
 sold_url:sold_url，购买链接，必填，/api/fetchItem.php接口返回
 
 brand_id：品牌ID，可选，/api/suggestion.php?action=brand接口返回
 brand_name：品牌名称，可选，/api/suggestion.php?action=brand接口返回
 brand_en_name：英文品牌名，可选，/api/suggestion.php?action=brand接口返回en_name
 brand_zh_name：中文品牌名，可选，/api/suggestion.php?action=brand接口返回zh_name
 model_name：型号，可选，/api/fetchItem.php接口返回
 total_sold，销量，可选，/api/fetchItem.php接口返回
 
 其他，暂时忽略：
 cate_id2:cate_id2,
 cate_name2:cate_name2,
 cate_id3:cate_id3,
 cate_name3:cate_name3,
 tags:selectTagList,
 */
+ (void)publishProduct:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 提交商品信息
 http://mobile.kancike.com/api/postItem.php
 POST
 data：
 商品页的html源码。
 key：
 购物网站编码，tb,jd,am_cn,am_en,ebay
 
 返回数据：
 code：1-返回成功，<0-抓取数据失败
 url：当code>1时，需要前端抓取html的地址
 msg：
 data：code=1时，返回的商品数据
 "from_site":""
 "itemid":""
 "sold_url":""
 "sold_title":""
 "price":""
 "currency":""
 "brand_name":""
 "pictureinfolist":""
 "total_sold":""
 */
+ (void)postItem:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 GET方法
 http://mobile.kancike.com/api/ware.php?action=push_top&photo_id=&cate_id
 
 photo_id：商品id，必填
 cate_id：分类id，可选
 
 数据格式：
 code
 msg
 [had_ware_push_top] => 1——浏览用户是否已顶过
 [ware_push_top] => 1——单品被顶数量
 */
+ (void)categoryPushTop:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 jp_郝庆晟  13:30:34
 消息中心
 http://mobile.kancike.com/api/msg_list.php?action=user&user_id=1000020
 
 action=user——某个用户的全部消息
 guest_id=100001——观看者的用户ID
 user_id=100001——数据拥有者的用户ID
 from=0——从第几条数据开始
 */
+ (void)massgeList:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 jp_郝庆晟  13:30:34
 公共参数
 http://api.danpin.com/getParam.php?guest_id=100016&os=iPhone&appVer=1.0.1&osVer=8.3&partner=appstore&uuid=fb533a4debb74015ae64409cf4c6ef6fac5806ca&&debug=1
 */
+ (void)publicList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 http://api.danpin.com/asking_list.php?action=latest&user_id=&cat2_id=&brand_id=&tag=&from=0&grid=1&os=iPhone&appVer=1.0.1&osVer=8.3&partner=appstore&uuid=fb533a4debb74015ae64409cf4c6ef6fac5806ca&ver=1.1&guest_id=100016&debug=1
 */
+ (void)askingList:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;


+ (void)statAndRefer:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 http://api.danpin.com/asking_detail.php?photo_id=1005384&from=0&os=iPhone&appVer=1.0.4&osVer=8.3&partner=appstore&uuid=b1458c080163fa8b9049f11950a5f00e50ed8431&ver=1.1&guest_id=100001&token=2ffecf4b147358b9d0a50e3f3b212a9746d443a306ecb8cd6f572f69f014dd4d
 */
+ (void)askingDetail:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 http://api.danpin.com/ware_detail_v1.1.php?photo_id=1003479&from=0&os=iPhone&appVer=1.0.4&osVer=8.3&partner=appstore&uuid=b1458c080163fa8b9049f11950a5f00e50ed8431&guest_id=100001&token=2ffecf4b147358b9d0a50e3f3b212a9746d443a306ecb8cd6f572f69f014dd4d
 */
+ (void)wareDetailV1:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)shaidanDetail:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
+ (void)chat:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 api.danpin.com/user_list.php?action=recommend
 */
+ (void)userlist:(NSDictionary*)params allowFetchCache:(BOOL)allowFetchCache success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
//抓取淘宝商品数据
+ (void)okTaobaoItem:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 http://api.danpin.com/sold_info_list.php?photo_id=1006060&os=iPhone&appVer=1.1.0&osVer=8.3&partner=appstore&uuid=b1458c080163fa8b9049f11950a5f00e50ed8431&guest_id=1000069&token=e2534db33ee068350e1815bf870e03a5e3b0af4c214eca221e839f1edebb5751&debug=1
 */
+(void)soldinfolist:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 *api.danpin.com/search_v1.1.2.php?action=shaidan&word=&mword=&from=29&os=iPhone&appVer=1.1.0&osVer=8.4.1&partner=appstore&uuid=cddf19055a8efdb489178df3922903779776d8dc&guest_id=100124&token=a482f54452f239a06f56c861bbcf76cd616d46be58366f19639f1b8c039a5c94
 * action shaidan  asking
 */
+ (void)searchlist:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;

#pragma shop
//
/*
 【收货地址列表】
 
 接口参数
 action = getShopAddressList
 
 返回值
 {'code'=>1, 'msg'=>'success','list'=>{}}
 */
+ (void)getShopAddressList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【添加收货地址】
 
 接口参数
 action = addShopAddress
 
 业务参数
 real_name	// 真实姓名
 id_card	// 订单标题
 id_card_front 	// 身份证正面照片
 id_card_behind	// 身份证反面照片
 province_id	// 省
 city_id	// 市
 town_id	// 区
 detail_address // 详细地址
 phone		// 手机号
 
 返回值
 {'code'=>1, 'msg'=>'success'}

 */
+ (void)addShopAddress:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 
 【修改收货地址】
 
 接口参数
 action = editShopAddress
 业务参数
 real_name	// 真实姓名
 id_card	// 订单标题
 id_card_front 	// 身份证正面照片
 id_card_behind	// 身份证反面照片
 province_id	// 省
 city_id	// 市
 town_id	// 区
 detail_address // 详细地址
 phone		// 手机号
 
 返回值
 {'code'=>1, 'msg'=>'success'}
 
 */
+ (void)editShopAddress:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 action = delShopAddress
 id
 */
+ (void)delShopAddressById:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【设置默认收货地址】
 
 接口参数
 action = setDefaultShopAddress
 
 业务参数
 id		// 收货地址id
 
 返回值
 {'code'=>1, 'msg'=>'success'}

 */
+ (void)setDefaultShopAddress:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【获取所有省市地址】
 接口参数 action = getPctAllData
 */
+ (void)getPctAllData:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【根据ID获取收货地址】
 
 接口参数
 action = getShopAddressById
 
 返回值
 {'code'=>1,'msg'=>'success','row'=>$row}
 
 */
+ (void)getShopAddressById:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【获取默认收货地址】
 
 接口参数
 action = getDefaultAddress
 
 返回值
 {'code'=>1,'msg'=>'success','row'=>$row}
 
 
 --------------------------------
 */
+ (void)getDefaultAddress:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 上传图片接口：
 http://www.danpin.com/api/uploadIdCard.php
 
 上传参数文件名 upfile
 */
+(void)uploadIdCard:(NSDictionary*)params images:(NSArray *)images success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure uploadProgress:(void(^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress;
/*
 【添加订单】
 
 接口参数
 action = addShopOrder
 
 业务参数
 
 subject	// 订单标题
 body,		// 交易描述信息
 send_fee	// 国际运费
 total_fee	// 订单总价
 num		// 购买数量
 goods_info     // 商品信息都放在这里
 {
 good_fee	// 商品价格
 good_img	// 商品图片
 good_name	// 商品名称
 good_intro	// 商品简介
 goods_sn	// 商品编号
 .....		// 其他
 }
 
 返回值
 {'code'=>1, 'msg'=>'success','return_url'=>h5界面url}
 
 */
+ (void)addShopOrder:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 --------------------------------
 
 【取消订单】
 接口参数 action = removeOrder
 业务参数 out_trade_no	//订单号
 
 返回json
 {
 "code": 1,
 "msg": "取消订单成功"
 }
 
 */
+ (void)removeOrder:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【订单确认签收】
 接口参数 action = signOrder
 业务参数 out_trade_no	//订单号
 
	返回json
	{
 "code": 1,
 "msg": "订单签收状态已确认"
	}
 */
+ (void)signOrder:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【订单列表】
 
 接口参数
 action = getShopOrderList
 
 业务参数
 page	// 第几页
 
 返回值
 {'data'=>{}, 'end'=>'1'}
 
 ----------------------------------
 */
+ (void)getShopOrderList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【根据ID获取订单】
 
 接口参数 action = getShopOrderById
 
 业务参数
 id	// 订单号
 
 返回值
 die(json_encode(array('code'=>1,'msg'=>'success','row'=>$row)));
 */
+ (void)getShopOrderById:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【支付成功后-同步通知】
 接口参数 action = alipayReturnUrl
 业务参数 return_data  // json 所有支付宝数据参数
 {'code'=>1, 'msg'=>'success'}
 */
+ (void)alipayReturnUrl:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*【用户抵扣积分】
【获取用户积分】

接口参数 action = getUserScore

{'code'=>1,'status'=>'success','score'=>123}
*/
+ (void)getUserScore:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*【获取用户余额】
 接口参数 action = getUserBalance
 业务参数 无
 
	返回json
	{
 "code": 1,
 "balance" : 10,
 "msg": "user balance"
	}
 */
+ (void)getUserBalance:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*余额抵税
 action = balanceTariff
 业务参数 out_trade_no
 */
+ (void)balanceTariff:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【用户留言】
 接口参数 action = addGuestMessage
 
 业务参数 out_trade_no  // 订单号
	question     //用户描述的问题
 
 {'code':1, 'msg':'感谢回馈，我们小编会联系您'}
 
 */
+ (void)addGuestMessage:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 【用户余额日志】
 接口参数 action = getShopBalanceList
 
 业务参数 from
 psize
 
 直接返回列表
 
 --------------------------------
 */
+ (void)getShopBalanceList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 --------------------------------
 
 【申请提现】
 接口参数 action = applyForCash
 
 业务参数 fee		//提现金额
 phone		//手机号
 real_name	//真实姓名
 alipay_account	//支付宝账号
 
 
 返回json
 die(json_encode(array('code'=>1,'msg'=>'暂时不能申请提现')));
 --------------------------------
 */
+ (void)applyForCash:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 --------------------------------
 
 【抵扣金额是否可用】
 接口参数 action = isCutFeeAllowed
 
 业务参数 dk_type	//抵扣类型  1积分、2用户余额
 dk_fee	//抵扣金额
 price		//原商品价格（抵扣前）
 out_trade_no	//订单号
 
 
 返回json
 'code'=> 1,
 'price' => $price,	//减去抵扣金额的支付价格
 'out_trade_no'=>$out_trade_no, //订单号
 'encryption' => $encryption //私密串
 
 客户端需要的私密Keys：chrdwHDHXT12345ssdlh
 加密方式  md5(
 $out_trade_no		//订单号
 $_SESSION['user_id'].	//用户登陆uid
 $price.			//$price原商品价
 $Keys			//私密Keys（不可向外泄露）
 $session['user_score']	//用户积分
 $session['user_balance']//用户余额
 date('YmdH')		//年月日时2015110711
 );
 
 --------------------------------
 */
+ (void)isCutFeeAllowed:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 * 获取货架分类
 * method http://test1.danpin.com/shopstyle_api.php?type=category
 */

+ (void)getStoreRacksCategory:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
/*
 * 获取货架分类对应数据
 * method http://test1.danpin.com/shopstyle_api.php?type=items&offset=0&sort=&category=&brand=&pagesize=1
 */


+ (void)getStoreRacksCategoryItems:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
//==========================================================
#pragma mark --------mgpyh interface  start
//==========================================================
/*
 * 获取爆料数据
 * method http://dpapi.mgpyh.com/api/v1/get_more/?source=dp&page=%@
 */

+ (void)getBaoLiaoList:(NSDictionary*)params success:(void(^)(AFHTTPRequestOperation* operation, id result))success failure:(void(^)(NSError* error))failure;
//==========================================================
#pragma mark --------mgpyh interface end
//==========================================================
@end